package com.trace.meat.entity;

    public enum StateCode {
        //状态码
        Login_Success(10000, "登录成功"),
        Login_Fail(10001, "登录失败"),
        Register_Success(20000,"注册失败"),
        Register_Fail(20001,"注册成功"),
        Illegal_Message(30001,"非法信息"),
        CRUD_Success(40000,"CRUD操作成功"),
        CRUD_Fail(40001,"CRUD操作失败");
        //属性
        private Integer codenum;
        private String state;
        //构造函数
        private StateCode(Integer codenum, String state) {
            this.codenum = codenum;
            this.state = state;
        }
        //getter和toString
        public Integer getCodenum() {
            return codenum;
        }

        public String getState() {
            return state;
        }

        @Override
        public String toString() {
            return "stateCode{" +
                    "codenum=" + codenum +
                    ", state='" + state + '\'' +
                    '}';
        }

    }
